﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AdministratorSite.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>
<script runat="server">
    public void Page_Load()
    {
        GridViewCountry.DataSource = ViewData["Country"];
        GridViewCountry.DataBind(); 
        GridViewClient.DataSource = ViewData["Client"];
        GridViewClient.DataBind();
        foreach (GridViewRow gvr in GridViewClient.Rows)
        {
            ((HyperLink)gvr.Cells[0].Controls[0]).NavigateUrl = "~/AdminMain/ViewDetails?type=_client" +
                                   "&key1=" + gvr.Cells[1].Text.ToString() +
                                   "&key2=&key3=";
        }
        GridViewMonth.DataSource = ViewData["Month"];
        GridViewMonth.DataBind();
        GridViewBestHotelChain.DataSource = ViewData["HotelChain"];
        GridViewBestHotelChain.DataBind();
        GridViewBestHotel.DataSource = ViewData["BestHotel"];
        GridViewBestHotel.DataBind();
        foreach (GridViewRow gvr in GridViewBestHotel.Rows)
        {
            ((HyperLink)gvr.Cells[0].Controls[0]).NavigateUrl = "~/AdminMain/ViewDetails?type=_hotel" + 
                                   "&key1="+ gvr.Cells[1].Text.ToString()+
                                   "&key2="+ gvr.Cells[2].Text.ToString()+
                                   "&key3="+ gvr.Cells[3].Text.ToString();
        }
    }
</script>
 <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
     <form id="form1" runat="server">
        <asp:Panel ID="Panel2" runat="server" Height="61px" 
        style="font-size: xx-large; font-weight: 700; font-family: Calibri">
            Main Admin Page</asp:Panel>
        
        <table style="width: 100%">
        
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td style="height: 16px; font-size: 20px;">
                Top 10 Best Selling Hotel Chains</td>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td>
                <asp:GridView ID="GridViewBestHotelChain" runat="server" CellPadding="5" 
        ForeColor="#333333" GridLines="None" BorderStyle="Solid" 
        BorderWidth="1px" CellSpacing="7" ShowFooter="True">
            <AlternatingRowStyle BackColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
            
        </asp:GridView></td>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td>
                &nbsp;</td>
           <tr>
            <td style="height: 16px; width: 44px">
                &nbsp;</td>
            <td style="height: 16px; font-size: 20px;">
                Top 10 Best Selling Hotels</td>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td>
                <asp:GridView ID="GridViewBestHotel" runat="server" CellPadding="5" 
        ForeColor="#333333" GridLines="None" BorderStyle="Solid" 
        BorderWidth="1px" CellSpacing="7" ShowFooter="True">
            <AlternatingRowStyle BackColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center"/>
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center"/>
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
            <Columns>
                <asp:HyperLinkField Text="View Details" />
           </Columns>
            
        </asp:GridView>
               </td>
           </tr>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td>
                &nbsp;</td>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td style="height: 16px; font-size: 20px;">
                Top 10 Best Selling Months</td>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td>
                <asp:GridView ID="GridViewMonth" runat="server" CellPadding="5" 
        ForeColor="#333333" GridLines="None" BorderStyle="Solid" 
        BorderWidth="1px" CellSpacing="7" ShowFooter="True">
            <AlternatingRowStyle BackColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center"/>
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
            
        </asp:GridView></td>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td>
                &nbsp;</td>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td style="height: 16px; font-size: 20px;">
                Top 10 Most Popular Country</td>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td>
                <asp:GridView ID="GridViewCountry" runat="server" CellPadding="5" 
        ForeColor="#333333" GridLines="None" BorderStyle="Solid" 
        BorderWidth="1px" CellSpacing="7" ShowFooter="True" 
        horizontalalign="Center">
            <AlternatingRowStyle BackColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center"/>
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />

        </asp:GridView></td>
           </tr>
                      <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td>
                &nbsp;</td>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td style="height: 16px; font-size: 20px;">
                Top 10 Most Loyal Clients</td>
           </tr>
           <tr>          <td style="width: 44px">
               &nbsp;</td>
            <td>
                <asp:GridView ID="GridViewClient" runat="server" CellPadding="5" 
        ForeColor="#333333" GridLines="None" BorderStyle="Solid" 
        BorderWidth="1px" CellSpacing="7" ShowFooter="True" 
        horizontalalign="Center">
            <AlternatingRowStyle BackColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center"/>
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                                    <Columns>
                <asp:HyperLinkField Text="View Details" />
           </Columns>
        </asp:GridView></td>
           </tr>
           </table>

        <div>
    </div>
     </form>
</asp:Content>
      
